package cn.starrysky.hrm.client;

import cn.starrysky.hrm.util.AjaxResult;
import feign.hystrix.FallbackFactory;

public class SystemClientFallBackFactory implements FallbackFactory<SystemClient>{
    @Override
    public SystemClient create(Throwable cause) {
        return new SystemClient() {
            @Override
            public AjaxResult getUserContext(Long id) {
                return AjaxResult.me().setSuccess(false).setMessage(cause.getMessage());
            }
        } ;
    }
}
